//
//  TouchView.m
//  UI04_事件_触摸_手势
//
//  Created by wyx on 16/3/18.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "TouchView.h"

@implementation TouchView

#pragma mark - 知识点1: 事件
#pragma mark - 知识点2: 触摸重写 touch方法
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [super touchesBegan:touches withEvent:event];
}
//在适当的时机让 delegate 调用此方法 此方法点击的时候调用方法
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [super touchesEnded:touches withEvent:event];
    if ([self.delegate respondsToSelector:@selector(didClicked:)]) {
        [self.delegate didClicked:self];
    }
}
@end
